﻿using System.Collections.Generic;
using SimpleServiceBus.Endpoint;
using SimpleServiceBus.Endpoint.Metadata;

namespace SimpleServiceBus.Bus.Pipeline
{
    public interface IMessageContext
    {
        IMessagingEndpoint Endpoint { get; }
        IEndpointDescription EndpointMetadata { get; }

        IMessagePipeline MessagePipeline { get; }

        MessageEnvelope MessageEnvelope { get; }
        bool AbortMessageProcessing { get; set; }

        IDictionary<string, object> MessageState { get; }

        T GetLocalService<T>();
    }
}